package ydj.cloud.example.nacosgateway.controller;

import ydj.cloud.example.nacosgateway.config.IgnoreUrlsConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Optional;

@RestController
public class TestController {

    @Autowired
    private IgnoreUrlsConfig ignoreUrlsConfig;

    @GetMapping(value = "/test")
    public String test() {
        Optional.ofNullable(ignoreUrlsConfig.getUrls()).get().forEach(item -> {
            System.out.println(item);
        });
        return "SUCCESS";
    }
}
